package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc DoubleWeekDto
 * @使用场景
 */
@Data
public class DoubleWeekDto extends BaseDto implements Serializable {

    /**
     * 周期名称
     */
    @ApiModelProperty("周期名称")
    private String cycleStandardName;

    /**
     * 周期开始时间
     */
    @ApiModelProperty("周期开始时间")
    private Date cycleStartTime;

    /**
     * 周期结束时间
     */
    @ApiModelProperty("周期结束时间")
    private Date cycleEndTime;

    /**
     * 周期类型标识
     */
    @ApiModelProperty("周期类型标识")
    private String cycleTypeCode;

    /**
     * 排序
     */
    @ApiModelProperty("排序")
    private Long orderNumber;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DoubleWeekDto that = (DoubleWeekDto) o;
        return (
                cycleStandardName == that.cycleStandardName &&
                        cycleStartTime == that.cycleStartTime &&
                        cycleEndTime == that.cycleEndTime &&
                        cycleTypeCode == that.cycleTypeCode &&
                        orderNumber == that.orderNumber
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                cycleStandardName,
                cycleStartTime,
                cycleEndTime,
                cycleTypeCode,
                orderNumber
        );
    }

}
